import request from "/@/utils/request"
//创建试题
export function addtkglQuestionList(obj?: Object) {
  return request({
    url: '/train/tkglQuestionList',
    method: 'post',
    data: obj
  })
}
//回显列表
// export function fetchList(id?: string) {
//   return request({
//     url: '/train/tkglQuestionList/getByFileId/' +id,
//     method: 'get',
//   })
// }
export function fetchList(query?: Object) {
  return request({
    url: '/train/tkglQuestionList/getByFileId',
    method: 'get',
    params: query
  })
}

export function addObj(obj?: Object) {
  return request({
    url: '/train/kszlTestQuestion',
    method: 'post',
    data: obj
  })
}

export function getObj(id?: string) {
  return request({
    url: '/train/kszlTestQuestion/' + id,
    method: 'get'
  })
}

export function delObjs(ids?: Object) {
  return request({
    url: '/train/kszlTestQuestion',
    method: 'delete',
    data: ids
  })
}

export function putObj(obj?: Object) {
  return request({
    url: '/train/kszlTestQuestion',
    method: 'put',
    data: obj
  })
}

